<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>认证资料</title>
    <link rel="stylesheet" type="text/css" href="../../../../css/aui/aui.css" />
    <link rel="stylesheet" type="text/css" href="../../../../css/html/issued/post_your_want_frm.css" />
    <style>
        .list_box {
            padding: 0 0.75rem;
        }

        .list_item {
            display: flex;
            justify-content: space-between;
            border-bottom: 1px solid #eee;
            line-height: 2.5rem;
        }

        .aui-icon-right {
            color: #ccc;
        }

        .apply_update {
            display: flex;
            align-items: center;
        }

        .apply_update_btn {
            width: 3.8rem;
            font-size: 0.6rem;
            background: #0689FB;
            color: #fff;
            border-radius: 0.2rem;
            text-align: center;
            line-height: 1rem;
            margin-left: 0.3rem;
        }

        .up_image {
            width: 35vw;
        }
    </style>
</head>

<body>
    <div id="app">
      <div  style="background:#ebebeb;padding:0.5rem 0.75rem;">
          <div style="margin:1rem 0 0.5rem 0;">审核结果：</div>
          <div><textarea class="textarea" disabled placeholder="正在审核，请耐心等待~" style="border-color:#a2a2a2;height:4rem;" v-model="info.auth_result"></textarea></div>
      </div>
        <div class="aui-content aui-margin-b-15">
            <ul class="aui-list aui-form-list">
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-label">户籍</div>
                        <div class="aui-list-item-input">
                            <input type="text" v-model="info.residence" value="山西省运城市闻喜县">
                        </div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-label">详细地址</div>
                        <div class="aui-list-item-input">
                            <input type="text" v-model="info.address" placeholder="山西省太原市小店区平阳路26号">
                        </div>
                    </div>
                </li>

                <li class="aui-list-item" style="border-top:0.5rem solid #F6F6F6;">
                    <div>
                        <div style="margin:1rem 0 0.5rem 0;">身份证照片<small style="font-size:0.5rem;color:#B7B7B7;">(证件正反面，单个图片大小不要超过2MB)</small></div>
                        <div class="up_image_box">
                            <div class="up_image"><img :src="info.idcard1" alt=""></div>
                            <div class="up_image"><img :src="info.idcard2" alt=""></div>
                        </div>
                    </div>
                </li>
                <li class="aui-list-item" style="border-top:0.5rem solid #F6F6F6;">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-label">工种</div>
                        <div class="aui-list-item-input apply_update">
                            <input type="text" v-model="info.work_cate_name" disabled>
                            <span class="apply_update_btn" @click="openWin('apply_update')">申请修改</span>
                        </div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div>
                        <div style="margin:1rem 0 0.5rem 0;">证书照片<small style="font-size:0.5rem;color:#B7B7B7;">(图片最多上传3张图，单个图片大小不要超过2MB)</small></div>
                        <div class="up_image_box" style="min-height:5rem;">

                            <div v-if="info.certificate_array.length>0" v-for="o in info.certificate_array" class="up_image">
                                <img :src="o">
                            </div>
                            <div v-else>暂无图片</div>
                        </div>
                    </div>
                </li>
                <li class="aui-list-item" style="background:rgba(0,0,0,0);border-top:0.5rem solid #f6f6f6;">
                    <div>
                        <div style="margin:1rem 0 0.5rem 0;">工作履历</div>
                        <div class="up_image_box" style="min-height:5rem;">
                            <div v-if="info.work_record">{{info.work_record}}</div>
                            <div v-else>暂无内容</div>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</body>
<script src="../../../../script/api.js" charset="utf-8"></script>
<script src="../../../../script/aui/aui-tab.js" charset="utf-8"></script>
<script src="../../../../script/common/jquery-3.3.1.min.js" charset="utf-8"></script>
<script src="../../../../script/common/common.js" charset="utf-8"></script>
<script src="../../../../script/common/config.js" charset="utf-8"></script>
<script src="../../../../script/common/vue.min.js" charset="utf-8"></script>
<script>
    apiready = function() {
        api.parseTapmode();
        vm.init();

    }

    var vm = new Vue({
        el: "#app",
        data: {
            userInfo: {},
            info: {}
        },
        methods: {
            init() {
                this.userInfo = get_local('userInfo');
                this.getDetail();
            },
            getDetail() {
                var that = this;
                var data = {
                    user_id: this.userInfo.user_id,
                    user_type: this.userInfo.user_type
                };
                _ajax(Config.api.UserAuthGetDetail, data, function(ret) {
                    if (ret.code === 200) {
                        that.info = ret.data;
                    }
                });
            },
            openWin(name) {
                var winInfo = {
                    apply_update: {
                        name: 'apply_update_win',
                        url: './apply_update_win.html'
                    },
                };
                if (name) {
                    open_w(winInfo[name].name, winInfo[name].url);
                } else {
                    $toast("正在开发中...");
                }
            }
        }
    });

    function addImg(e) {
        imageUpload(Config.api.ImageUploadPrivacy, function(ret) {
            console.log(JSON.stringify(ret));
            $(e).find('img').attr('src', ret.imgurl).css({'width': '100%', 'height': '100%'});
        });
    }
</script>

</html>
